package com.university.vo;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Student entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "student", catalog = "university")

public class Student implements java.io.Serializable {

	// Fields

	private Integer studentId;
	private String studentUsername;
	private String studentPassword;
	private String studentNickName;
	private Timestamp studentBirth;
	private Integer studentSchoolId;
	private String studentIcon;
	private Timestamp studentInputTime;
	private String studentQuestion;
	private String studentAnswer;
	private String studentSex;
	private Boolean studentIsBanned;
	private String studentPhone;
	private Double studentAccount;
	private String studentMajor;
	private String studentName;
	private String studentPlace;
	private String studentEducation;
	private String studentEmail;
	private String studentTitle;
	private Integer studentExpectedSalary;
	private String studentJobArea;
	private String studentInfo;
	private Set<Parttimestudent> parttimestudents = new HashSet<Parttimestudent>(0);
	private Set<Studentcomment> studentcomments = new HashSet<Studentcomment>(0);
	private Set<Studentcomplain> studentcomplains = new HashSet<Studentcomplain>(0);
	private Set<Settle> settles = new HashSet<Settle>(0);
	private Set<City> cities = new HashSet<City>(0);
	private Set<Attention> attentions = new HashSet<Attention>(0);
	private Set<Companycomment> companycomments = new HashSet<Companycomment>(0);
	private Set<Companycomplain> companycomplains = new HashSet<Companycomplain>(0);

	// Constructors

	/** default constructor */
	public Student() {
	}

	@Override
	public String toString() {
		return "Student [studentId=" + studentId + ", studentUsername=" + studentUsername + ", studentPassword="
				+ studentPassword + ", studentNickName=" + studentNickName + ", studentBirth=" + studentBirth
				+ ", studentSchoolId=" + studentSchoolId + ", studentIcon=" + studentIcon + ", studentInputTime="
				+ studentInputTime + ", studentQuestion=" + studentQuestion + ", studentAnswer=" + studentAnswer
				+ ", studentSex=" + studentSex + ", studentIsBanned=" + studentIsBanned + ", studentPhone="
				+ studentPhone + ", studentAccount=" + studentAccount + ", studentMajor=" + studentMajor
				+ ", studentName=" + studentName + ", studentPlace=" + studentPlace + ", studentEducation="
				+ studentEducation + ", studentEmail=" + studentEmail + ", studentTitle=" + studentTitle
				+ ", studentExpectedSalary=" + studentExpectedSalary + ", studentJobArea=" + studentJobArea
				+ ", studentInfo=" + studentInfo + ", parttimestudents=" + parttimestudents + ", studentcomments="
				+ studentcomments + ", studentcomplains=" + studentcomplains + ", settles=" + settles + ", cities="
				+ cities + ", attentions=" + attentions + ", companycomments=" + companycomments + ", companycomplains="
				+ companycomplains + "]";
	}

	/** full constructor */
	public Student(String studentUsername, String studentPassword, String studentNickName, Timestamp studentBirth,
			Integer studentSchoolId, String studentIcon, Timestamp studentInputTime, String studentQuestion,
			String studentAnswer, String studentSex, Boolean studentIsBanned, String studentPhone,
			Double studentAccount, String studentMajor, String studentName, String studentPlace,
			String studentEducation, String studentEmail, String studentTitle, Integer studentExpectedSalary,
			String studentJobArea, String studentInfo, Set<Parttimestudent> parttimestudents,
			Set<Studentcomment> studentcomments, Set<Studentcomplain> studentcomplains, Set<Settle> settles,
			Set<City> cities, Set<Attention> attentions, Set<Companycomment> companycomments,
			Set<Companycomplain> companycomplains) {
		this.studentUsername = studentUsername;
		this.studentPassword = studentPassword;
		this.studentNickName = studentNickName;
		this.studentBirth = studentBirth;
		this.studentSchoolId = studentSchoolId;
		this.studentIcon = studentIcon;
		this.studentInputTime = studentInputTime;
		this.studentQuestion = studentQuestion;
		this.studentAnswer = studentAnswer;
		this.studentSex = studentSex;
		this.studentIsBanned = studentIsBanned;
		this.studentPhone = studentPhone;
		this.studentAccount = studentAccount;
		this.studentMajor = studentMajor;
		this.studentName = studentName;
		this.studentPlace = studentPlace;
		this.studentEducation = studentEducation;
		this.studentEmail = studentEmail;
		this.studentTitle = studentTitle;
		this.studentExpectedSalary = studentExpectedSalary;
		this.studentJobArea = studentJobArea;
		this.studentInfo = studentInfo;
		this.parttimestudents = parttimestudents;
		this.studentcomments = studentcomments;
		this.studentcomplains = studentcomplains;
		this.settles = settles;
		this.cities = cities;
		this.attentions = attentions;
		this.companycomments = companycomments;
		this.companycomplains = companycomplains;
	}

	// Property accessors
	@Id
	@GeneratedValue

	@Column(name = "student_id", unique = true, nullable = false)

	public Integer getStudentId() {
		return this.studentId;
	}

	public void setStudentId(Integer studentId) {
		this.studentId = studentId;
	}

	@Column(name = "student_username", length = 20)

	public String getStudentUsername() {
		return this.studentUsername;
	}

	public void setStudentUsername(String studentUsername) {
		this.studentUsername = studentUsername;
	}

	@Column(name = "student_password", length = 20)

	public String getStudentPassword() {
		return this.studentPassword;
	}

	public void setStudentPassword(String studentPassword) {
		this.studentPassword = studentPassword;
	}

	@Column(name = "student_nickName", length = 20)

	public String getStudentNickName() {
		return this.studentNickName;
	}

	public void setStudentNickName(String studentNickName) {
		this.studentNickName = studentNickName;
	}

	@Column(name = "student_birth", length = 19)

	public Timestamp getStudentBirth() {
		return this.studentBirth;
	}

	public void setStudentBirth(Timestamp studentBirth) {
		this.studentBirth = studentBirth;
	}

	@Column(name = "student_schoolId")

	public Integer getStudentSchoolId() {
		return this.studentSchoolId;
	}

	public void setStudentSchoolId(Integer studentSchoolId) {
		this.studentSchoolId = studentSchoolId;
	}

	@Column(name = "student_icon", length = 50)

	public String getStudentIcon() {
		return this.studentIcon;
	}

	public void setStudentIcon(String studentIcon) {
		this.studentIcon = studentIcon;
	}

	@Column(name = "student_inputTime", length = 19)

	public Timestamp getStudentInputTime() {
		return this.studentInputTime;
	}

	public void setStudentInputTime(Timestamp studentInputTime) {
		this.studentInputTime = studentInputTime;
	}

	@Column(name = "student_question", length = 50)

	public String getStudentQuestion() {
		return this.studentQuestion;
	}

	public void setStudentQuestion(String studentQuestion) {
		this.studentQuestion = studentQuestion;
	}

	@Column(name = "student_answer", length = 50)

	public String getStudentAnswer() {
		return this.studentAnswer;
	}

	public void setStudentAnswer(String studentAnswer) {
		this.studentAnswer = studentAnswer;
	}

	@Column(name = "student_sex", length = 2)

	public String getStudentSex() {
		return this.studentSex;
	}

	public void setStudentSex(String studentSex) {
		this.studentSex = studentSex;
	}

	@Column(name = "student_isBanned", insertable = false)

	public Boolean getStudentIsBanned() {
		return this.studentIsBanned;
	}

	public void setStudentIsBanned(Boolean studentIsBanned) {
		this.studentIsBanned = studentIsBanned;
	}

	@Column(name = "student_phone", length = 11)

	public String getStudentPhone() {
		return this.studentPhone;
	}

	public void setStudentPhone(String studentPhone) {
		this.studentPhone = studentPhone;
	}

	@Column(name = "student_account", precision = 22, scale = 0, insertable = false)

	public Double getStudentAccount() {
		return this.studentAccount;
	}

	public void setStudentAccount(Double studentAccount) {
		this.studentAccount = studentAccount;
	}

	@Column(name = "student_major", length = 50)

	public String getStudentMajor() {
		return this.studentMajor;
	}

	public void setStudentMajor(String studentMajor) {
		this.studentMajor = studentMajor;
	}

	@Column(name = "student_name", length = 10)

	public String getStudentName() {
		return this.studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	@Column(name = "student_place", length = 100)

	public String getStudentPlace() {
		return this.studentPlace;
	}

	public void setStudentPlace(String studentPlace) {
		this.studentPlace = studentPlace;
	}

	@Column(name = "student_education", length = 10)

	public String getStudentEducation() {
		return this.studentEducation;
	}

	public void setStudentEducation(String studentEducation) {
		this.studentEducation = studentEducation;
	}

	@Column(name = "student_email", length = 100)

	public String getStudentEmail() {
		return this.studentEmail;
	}

	public void setStudentEmail(String studentEmail) {
		this.studentEmail = studentEmail;
	}

	@Column(name = "student_title", length = 100)

	public String getStudentTitle() {
		return this.studentTitle;
	}

	public void setStudentTitle(String studentTitle) {
		this.studentTitle = studentTitle;
	}

	@Column(name = "student_expectedSalary")

	public Integer getStudentExpectedSalary() {
		return this.studentExpectedSalary;
	}

	public void setStudentExpectedSalary(Integer studentExpectedSalary) {
		this.studentExpectedSalary = studentExpectedSalary;
	}

	@Column(name = "student_jobArea", length = 50)

	public String getStudentJobArea() {
		return this.studentJobArea;
	}

	public void setStudentJobArea(String studentJobArea) {
		this.studentJobArea = studentJobArea;
	}

	@Column(name = "student_info", length = 2000)

	public String getStudentInfo() {
		return this.studentInfo;
	}

	public void setStudentInfo(String studentInfo) {
		this.studentInfo = studentInfo;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "student")

	public Set<Parttimestudent> getParttimestudents() {
		return this.parttimestudents;
	}

	public void setParttimestudents(Set<Parttimestudent> parttimestudents) {
		this.parttimestudents = parttimestudents;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "student")

	public Set<Studentcomment> getStudentcomments() {
		return this.studentcomments;
	}

	public void setStudentcomments(Set<Studentcomment> studentcomments) {
		this.studentcomments = studentcomments;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "student")

	public Set<Studentcomplain> getStudentcomplains() {
		return this.studentcomplains;
	}

	public void setStudentcomplains(Set<Studentcomplain> studentcomplains) {
		this.studentcomplains = studentcomplains;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "student")

	public Set<Settle> getSettles() {
		return this.settles;
	}

	public void setSettles(Set<Settle> settles) {
		this.settles = settles;
	}

	@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinTable(name = "studentjobarea", catalog = "university", joinColumns = {
			@JoinColumn(name = "studentJobArea_studentId", updatable = false) }, inverseJoinColumns = {
					@JoinColumn(name = "studentJobArea_cityId", updatable = false) })

	public Set<City> getCities() {
		return this.cities;
	}

	public void setCities(Set<City> cities) {
		this.cities = cities;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "student")

	public Set<Attention> getAttentions() {
		return this.attentions;
	}

	public void setAttentions(Set<Attention> attentions) {
		this.attentions = attentions;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "student")

	public Set<Companycomment> getCompanycomments() {
		return this.companycomments;
	}

	public void setCompanycomments(Set<Companycomment> companycomments) {
		this.companycomments = companycomments;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "student")

	public Set<Companycomplain> getCompanycomplains() {
		return this.companycomplains;
	}

	public void setCompanycomplains(Set<Companycomplain> companycomplains) {
		this.companycomplains = companycomplains;
	}

}